package com.food;


import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.location.LocationProvider;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.AnimationSet;
import android.view.animation.AnimationUtils;
import android.view.animation.LayoutAnimationController;
import android.view.animation.TranslateAnimation;
import android.widget.Button;
import android.widget.TextView;
import android.location.*;

public class FOODActivity extends Activity {
    private static final String TAG = null;
    private LocationListener myList;

	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Button but_Sin = (Button) this.findViewById(R.id.button_Singleplayer);
        but_Sin.setOnClickListener(new View.OnClickListener() 
        {     	
			@Override
			public void onClick(View v) {
				startActivity(new Intent("com.food.singleplayer"));
				
			}
		});
        
        
        Button but_Mul = (Button) this.findViewById(R.id.button_Multiplayer);
        but_Mul.setOnClickListener(new View.OnClickListener() 
        {
			@Override
			public void onClick(View v) {
				startActivity(new Intent("com.food.multiplayer"));
				
			}
		});
        
        
        Button but_Join = (Button) this.findViewById(R.id.button_joinMulti);
        but_Join.setOnClickListener(new View.OnClickListener() 
        {
			@Override
			public void onClick(View v) {
				startActivity(new Intent("com.food.join"));
				
			}
		});
        
/*        LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
        
        myList = new myLocationListener();
        
        lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, myList);*/
        
    }
       
    
/*    private class myLocationListener implements LocationListener{

			@Override
			public void onLocationChanged(Location location) {
				if(location!=null)
				{
					Location locationB = new Location("point B");

					locationB.setLatitude(21);
					locationB.setLongitude(20);

					Float distance = location.distanceTo(locationB);
					Log.v(TAG,Float.toString(distance));
					t.setText(Float.toString(distance));				
				}
				else
				{
					Log.v(TAG,"Null pointer");
				}
				
			}

			@Override
			public void onProviderDisabled(String provider) {
				// TODO Auto-generated method stub
				
			}

			@Override
			public void onProviderEnabled(String provider) {
				// TODO Auto-generated method stub
				
			}

			@Override
			public void onStatusChanged(String provider, int status,
					Bundle extras) {
				// TODO Auto-generated method stub
				
			}
        	
        }*/
        
        /*LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
        String locationProvider = LocationManager.NETWORK_PROVIDER;
        locationManager.requestLocationUpdates(locationProvider, 0, 0, locationListener);

        Location l = locationManager.getLastKnownLocation(locationProvider);
        Log.v(TAG,l.toString());
        t.setText((int) l.getAltitude());
        //t.setText("Test");
        */
        
    
    
}